<%@include file="includes/top.jsp"%>
<script type="text/javascript" src="<c:url value="/js/MyInfusion.js" />"></script>
<h1><spring:message code="${pageTitle}" /></h1>
<c:if test="${fn:length(users) eq 0}">
     <div id="msg" class="errors"><p><spring:message code="management.users.service.warn" /></p></div>
 </c:if>

<c:if test="${not empty param.status}">
	<div id="msg" class="success"><spring:message code="management.users.status.${param.status}" arguments="${param.name}" /></div>
</c:if>

<table id="headerTable" class="headerTable">
	<tr>
		<th class="th1"><spring:message code="management.user.manage.label.name" /></th>
		<th class="th2"><spring:message code="management.user.manage.label.isAdministrator" /></th>
	 	<th class="th9">&nbsp;</th>
		<th class="th10">&nbsp;</th> 
	</tr>
</table>

<div id="tableWrapper" class="tableWrapper">
	<table id="scrollTable" class="scrollTable highlight small">
		<tbody>
	       <c:forEach items="${users}" var="user" varStatus="status">
	       <tr id="row${status.index}"${param.id eq user.id ? ' class="added"' : ''}>
	         <td id="${user.name}" class="td1">${user.name}</td>
	         <td id="${user.name}" class="td2">${user.isManageUser ne 'true' ? "No" : "Yes"}</td>
	         <c:if test="${user.name ne 'casuser'}">
			         <td class="td9" id="edit${status.index}"><a href="editUser.html?id=${user.id}" class="edit"><spring:message code="management.services.manage.action.edit" /></a></td> 
			         <td class="td10" id="delete${status.index}"><a href="#" class="del" onclick="swapButtonsForConfirmUser('${status.index}','${user.id}'); return false;"><spring:message code="management.services.manage.action.delete" /></a></td>
	         </c:if>
	         <c:if test="${user.name eq 'casuser'}">
		         	<td class="td9" id="edit${status.index}"><a href="editUser.html?id=${user.id}" class="edit"><spring:message code="management.services.manage.action.edit" /></a></td> 
				      <td class="td10" id="delete${status.index}"></td>
			     </c:if>
	         <!--<td class="td2">${fn:length(service.serviceId) < 100 ? service.serviceId : fn:substring(service.serviceId, 0, 100)}</td>
	         <td class="ac td3"><img src="images/${service.enabled}.gif" alt="${service.enabled ? 'Enabled' : 'Disabled'}" /></td>
	         <td class="ac td4"><img src="images/${service.allowedToProxy}.gif" alt="${service.allowedToProxy ? 'Allowed to Proxy' : 'Not Allowed to Proxy'}" /></td>
	         <td class="ac td5"><img src="images/${service.ssoEnabled}.gif" alt="${service.ssoEnabled ? 'SSO Enabled' : 'SSO Disabled'}" /></td>
	         <td class="ac td6"><img src="images/${service.anonymousAccess}.gif" alt="${service.anonymousAccess ? 'Anonyous Access Enabled' : 'Anonyous Access Disabled'}" /></td>
	         <td class="ac td7">${service.usernameAttribute}</td>
	         <td class="ac td8">${service.evaluationOrder}</td>
	         <td class="td9" id="edit${status.index}"><a href="edit.html?id=${service.id}" class="edit"><spring:message code="management.services.manage.action.edit" /></a></td> 
	         <td class="td10" id="delete${status.index}"><a href="#" class="del" onclick="swapButtonsForConfirm('${status.index}','${service.id}'); return false;"><spring:message code="management.services.manage.action.delete" /></a></td>-->
	       </tr>
	       </c:forEach>
		</tbody>
	</table>
</div>
<div class="add"><a href="addUser.html"><span style="text-transform: lowercase;"><spring:message code="addUserView" /></span></a></div>
<%@include file="includes/bottom.jsp" %>